import org.junit.After;

import org.junit.Before;
import org.junit.Test;

import java.util.Date;
import java.util.List;

public class UserTest {
    public class UserTest {
            System.out.println(u);
    }
}

@Test
public void selectById(){
    User user = mapper.selectById(2);
    System.out.println(user);
}
@Test
public void selectLikeName(){
    List<User> users = mapper.selectLikeName("a");
    //4、打印测试
    for(User u:users){
        System.out.println(u);
    }
}

@Test
public void updateNameById(){
    mapper.updateNameById(1,"bbb");
}
@Test
public void insert(){
    mapper.insert("add",200,new Date());
}

@Test
public void insertUser(){
    User u=new User();
    u.setName("add1");
    u.setSal(300);
    u.setBirthday(new Date());
    mapper.insertUser(u);
}

@Test
public void deleteByArray(){
    int[] ids={12,13};
    mapper.deleteByArray(ids);
}
}